// @ts-ignore
/* eslint-disable */
import { request } from '@umijs/max';

/** addOrderInfo POST /api/orderInfo/add */
export async function addOrderInfoUsingPost(
  body: API.OrderInfoAddRequest,
  options?: { [key: string]: any },
) {
  return request<API.BaseResponseLong_>('/api/orderInfo/add', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** getTotalCount GET /api/orderInfo/count */
export async function getTotalCountUsingGet1(options?: { [key: string]: any }) {
  return request<API.BaseResponseLong_>('/api/orderInfo/count', {
    method: 'GET',
    ...(options || {}),
  });
}

/** dayNewlyAddedOrderInfo POST /api/orderInfo/day/newly/added */
export async function dayNewlyAddedOrderInfoUsingPost(options?: { [key: string]: any }) {
  return request<API.BaseResponseListDataGroupByDateDTO_>('/api/orderInfo/day/newly/added', {
    method: 'POST',
    ...(options || {}),
  });
}

/** deleteOrderInfo POST /api/orderInfo/delete */
export async function deleteOrderInfoUsingPost(
  body: API.DeleteRequest,
  options?: { [key: string]: any },
) {
  return request<API.BaseResponseBoolean_>('/api/orderInfo/delete', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** editOrderInfo POST /api/orderInfo/edit */
export async function editOrderInfoUsingPost(
  body: API.OrderInfoEditRequest,
  options?: { [key: string]: any },
) {
  return request<API.BaseResponseBoolean_>('/api/orderInfo/edit', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** updateExpiredOrderInfo POST /api/orderInfo/expired */
export async function updateExpiredOrderInfoUsingPost(
  body: API.OrderInfoExpiredRequest,
  options?: { [key: string]: any },
) {
  return request<API.BaseResponseBoolean_>('/api/orderInfo/expired', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** getOrderInfoVOById GET /api/orderInfo/get/vo */
export async function getOrderInfoVoByIdUsingGet(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.getOrderInfoVOByIdUsingGETParams,
  options?: { [key: string]: any },
) {
  return request<API.BaseResponseOrderInfoVO_>('/api/orderInfo/get/vo', {
    method: 'GET',
    params: {
      ...params,
    },
    ...(options || {}),
  });
}

/** listOrderInfoByPage POST /api/orderInfo/list/page */
export async function listOrderInfoByPageUsingPost(
  body: API.OrderInfoQueryRequest,
  options?: { [key: string]: any },
) {
  return request<API.BaseResponsePageOrderInfo_>('/api/orderInfo/list/page', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** listOrderInfoVOByPage POST /api/orderInfo/list/page/vo */
export async function listOrderInfoVoByPageUsingPost(
  body: API.OrderInfoQueryRequest,
  options?: { [key: string]: any },
) {
  return request<API.BaseResponsePageOrderInfoVO_>('/api/orderInfo/list/page/vo', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** listMyOrderInfoVOByPage POST /api/orderInfo/my/list/page/vo */
export async function listMyOrderInfoVoByPageUsingPost(
  body: API.OrderInfoQueryRequest,
  options?: { [key: string]: any },
) {
  return request<API.BaseResponsePageOrderInfoVO_>('/api/orderInfo/my/list/page/vo', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** getSalesStatistics GET /api/orderInfo/sales/statistics */
export async function getSalesStatisticsUsingGet(options?: { [key: string]: any }) {
  return request<API.BaseResponseSalesStatisticsDTO_>('/api/orderInfo/sales/statistics', {
    method: 'GET',
    ...(options || {}),
  });
}

/** updateOrderInfo POST /api/orderInfo/update */
export async function updateOrderInfoUsingPost(
  body: API.OrderInfoUpdateRequest,
  options?: { [key: string]: any },
) {
  return request<API.BaseResponseBoolean_>('/api/orderInfo/update', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}
